package net.yondervision.hrfsp.sdk.esign.domain.request;

import cn.hutool.http.Method;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import net.yondervision.hrfsp.sdk.esign.domain.AbstractESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.ESignRequest;
import net.yondervision.hrfsp.sdk.esign.domain.request.body.SignflowsParamBody;
import net.yondervision.hrfsp.sdk.esign.domain.response.SignflowsResponse;

/**
 * @author Cash Zhang
 * @version v1.0
 * @since 2019/09/28 11:39
 */
@Data
@Builder
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
public class SignflowsRequest extends AbstractESignRequest implements
    ESignRequest<SignflowsResponse> {

  private SignflowsParamBody signflowsParamBody;

  public SignflowsRequest(
      SignflowsParamBody signflowsParamBody) {
    this.signflowsParamBody = signflowsParamBody;
    this.setParamBody(signflowsParamBody);
  }

  @Override
  public String getUrl() {
    return "/signflows";
  }

  @Override
  public Method getMethodType() {
    return Method.POST;
  }


  @Override
  public Class<SignflowsResponse> getResponseClass() {
    return SignflowsResponse.class;
  }
}
